package com.gitee.hljdrl.logger;


public class L {

    private static com.gitee.hljdrl.logger.LogOut FACTORY_LOG;
    private static boolean enable;

    static {
        FACTORY_LOG = new AndroidLogout();
        enable = true;
    }

    public static void setLogOut(com.gitee.hljdrl.logger.LogOut logOut) {
        synchronized (com.ffsky.logger.L.class) {
            FACTORY_LOG = logOut;
            enable = (FACTORY_LOG != null);
        }
    }

    public static LogOut getLogout() {
        return FACTORY_LOG;
    }

    public static String getFile() {
        if (enable) {
            return FACTORY_LOG.getLoggerFile();
        }
        return null;
    }

    public static void open() {
        if (enable) {
            FACTORY_LOG.open();
        }
    }

    public static void close() {
        if (enable) {
            FACTORY_LOG.close();
        }
    }

    public static void w(String tag, String msg) {
        if (enable) {
            FACTORY_LOG.w(tag, msg);
        }
    }

    public static void w(String tag, String... msg) {
        if (enable) {
            FACTORY_LOG.w(tag, msg);
        }
    }

    public static void w(String tag, Object... msg) {
        if (enable) {
            FACTORY_LOG.w(tag, msg);
        }
    }

    public static void i(String tag, String msg) {
        if (enable) {
            FACTORY_LOG.i(tag, msg);
        }
    }

    public static void i(String tag, String... msg) {
        if (enable) {
            FACTORY_LOG.i(tag, msg);
        }
    }

    public static void i(String tag, Object... msg) {
        if (enable) {
            FACTORY_LOG.i(tag, msg);
        }
    }

    public static void d(String tag, String msg) {
        if (enable) {
            FACTORY_LOG.d(tag, msg);
        }
    }

    public static void d(String tag, String... msg) {
        if (enable) {
            FACTORY_LOG.d(tag, msg);
        }
    }

    public static void d(String tag, Object... msg) {
        if (enable) {
            FACTORY_LOG.d(tag, msg);
        }
    }

    public static void e(String tag, String msg) {
        if (enable) {
            FACTORY_LOG.e(tag, msg);
        }
    }

    public static void e(String tag, Object... msg) {
        if (enable) {
            FACTORY_LOG.e(tag, msg);
        }
    }

    public static void e(String tag, Throwable throwable) {
        if (enable) {
            FACTORY_LOG.e(tag, throwable);
        }
    }

    public static void e(String tag, String msg, Throwable throwable) {
        if (enable) {
            FACTORY_LOG.e(tag, msg, throwable);
        }
    }
}
